package com.ws.shop.dao;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.ws.shop.bean.Page;
import com.ws.shop.entity.Auction;
import com.ws.shop.entity.AuctionLog;

public interface AuctionDao {
	public List<Map<String,Object>> findeAuctionList(final int state,final int limit);
	
	public AuctionLog findAuctionLog(final long aid,final int uid);
	
	public double beatsum(final long aid,final int uid);
	
	public Auction findAuctionById(int id);

	public Page findAuctionListPage(int pageno, int pagesize, String goodsname);

	public void saveOrUpdate(Auction auction);
	
	public boolean issaveprice(final int uid,final long aid);
	
	public int saveInsured(final int uid,final long aid);
	
	public List<Map<String,Object>> getHead() throws SQLException;
	
	public String getids(int state) throws SQLException;
	
	public List<Map<String,Object>> getRecommend(String date) throws SQLException;
	
	//更新开始竞拍状态
	public int updateState(long id,int state);
	
	public List<Auction> showAuction(String condition );
	
	public Page findAuctionListPage(int pageno, int pagesize, int cid,int state,int isfree);
	
	public Map<Long,Auction> getAuctionByState(final int state);

	public List<Map<String, Object>> findAuctionNeedStart();
	
	public Auction bids(int uid, int aid) ;

	public Page findSelectRobotsByAidPage(int pageno, int pagesize, int aid);
	
	public void userAuctioningList(final Page page,final int uid);

	public void addauctionrobot(int aid, int uid);

	public void delauctionrobot(int rid);
	
	//成交商品数量
	public int getAuctionGoodsTradingVolume(int state);

	public List<Map<String, Object>> findAuctionList(int startrow,
			int limit,int state);
	
	public int updateAuctionState(final Auction auction);

	public void updateHtml(long id, String htmlFilePath);
	
}
